/**
 * Project Name:xiaocao-java-basic
 * File Name:SealedClassDemo.java
 * Package Name:top.wanzc.java.basic.jdk9.to17.feature
 * Date:2024年2月9日下午9:59:06
 * Copyright (c) 2024, zhengchong.wan@minicore.com.hk All Rights Reserved.
 *
*/

package top.wanzc.java.basic.jdk9.to17.feature;
/**
 * @className:SealedClassDemo 
 * @comment: 注释信息 
 * @date:     2024年2月9日 下午9:59:06 
 * @author   zhengchong.wan
 * @since    V1.0.0	 
 */
sealed class Graphic permits Circle, Rectangle, Triangle {

}

final class Triangle extends Graphic {

}

non-sealed class Circle extends Graphic {

}

sealed class Rectangle extends Graphic permits Square {

}

final class Square extends Rectangle {

}

public class SealedClassDemo {

}

